﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wchl.WMBlog.Model.Maps
{
    using System.Data.Entity.ModelConfiguration;
    using Wchl.WMBlog.Model.Models;

    public class SysUserInfoMap:EntityTypeConfiguration<SysUserInfo>
    {
        /// <summary>
        /// 方法重构，HasKey设置主键，HasMaxLength字段最大长度。
        /// </summary>
        public SysUserInfoMap()
        {
            this.HasKey(u => u.ID);//用户ID
            this.Property(u => u.LoginName).HasMaxLength(60);//登录账号
            this.Property(u => u.LoginPWD).HasMaxLength(60);// 登录密码
            this.Property(u => u.RealName).HasMaxLength(60);// 真实姓名
        }
    }
}
